class Solution:
    def fizzBuzz(self, n: int):
        result_list = []
        if isinstance(n, int):
            for i in range(1, n + 1):
                if i % 3 == 0 and i % 5 != 0:
                    result_list.append("Fizz")
                elif i % 3 != 0 and i % 5 == 0:
                    result_list.append("Buzz")
                elif i % 3 == 0 and i % 5 == 0:
                    result_list.append("FizzBuzz")
                else:
                    result_list.append(str(i))
        else:
            print("请输入整形数字！")
        return result_list


if __name__ == '__main__':
    a = Solution()
    print(a.fizzBuzz(3))
